package com.kzx.blog.service.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;

/**
 * @author kongz
 * @version 1.0 2021/12/2 14:50
 * @description 博客分页查询参数
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BlogPagingParam extends PagingParam{
    /*
    作者
     */
    @Min(value = -1, message = "错误的作者编号传入")
    private int author;
    /*
    标题
     */
    private String title;
    /*
    状态
     */
    @Range(min = -1, max = 2, message = "错误的状态传入")
    private int status;
    /*
    类型
     */
    @Range(min = -1, max = 1, message = "错误的类型传入")
    private int type;
    /*
    置顶
     */
    @Range(min = -1, max = 1, message = "错误的置顶传入")
    private int top;
}
